home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Devices / NuBus⁄Slot Manager / Declaration ROMs / ExROM-1Func sResource / ExROM1Fun.list < prev   
Encoding:
Text File  |  1992-08-14  |  19.7 KB  |  299 lines  |  [TEXT/MPS ]

  1.  
  2. MC68020 Assembler - Ver 3.0                                                                                08-Mar-89  Page   1
  3. Copyright Apple Computer, Inc. 1984-1988
  4.  
  5. Loc   F Object Code     Addr  M    Source Statement
  6.  
  7.                                    ;-------------------------------------------------------------------
  8.                                    ;
  9.                                    ;File:          ExROM1Fun.a
  10.                                    ;Dev system:    MPW 3.0
  11.                                    ;By:            MacDTS
  12.                                    ;Date:            3/8/89
  13.                                    ;
  14.                                    ; This is a very small sample declaration ROM with the required board
  15.                                    ; sResource and a functional sResource (which is phony and blank at this time).
  16.                                    ; The board id and functional sResource types are especially bogus - these values
  17.                                    ; must be obtained from MacDTS, after sending in the required information.
  18.                                    ; Anyway, this file is meant to show how to put together a ROM.  Other references
  19.                                    ; are the Cards and Drivers manual, with the source code for a ROM and driver
  20.                                    ; (both are stripped down versions of the Apple Macintosh Video card ROM and
  21.                                    ; video driver (aka the TFB board).  There are also other examples and exploded
  22.                                    ; drawings of other declaration ROMs up on AppleLink which you can download.  To
  23.                                    ; get to them, go into (in order):
  24.                                    ;
  25.                                    ;  Developer Services icon
  26.                                    ;     Developer Technical Support folder
  27.                                    ;        Macintosh folder
  28.                                    ;           Tools folder
  29.                                    ;             Card Dev tools folder
  30.                                    ;
  31.                                    ;
  32.                                    ;In the Card Dev tools folder, there are other folders containing tools and
  33.                                    ;libraries.  Those include:
  34.                                    ;
  35.                                    ;Examples folder          - contains example declaration ROMs, video driver,
  36.                                    ;                           source to a program like the GetsInfo program found
  37.                                    ;                            in the Slot Tools folder
  38.                                    ;Gamma Information folder - contains documention discussing gamma table format.
  39.                                    ;                           This will be updated in later documentation for the
  40.                                    ;                           new 32-bit QuickDraw.  Contact Evangelism for
  41.                                    ;                           information on this project.  This folder won't be
  42.                                    ;                           updated while seeding is going on, so the place to
  43.                                    ;                           get it will be through Evangelism, and most likely,
  44.                                    ;                           later on through APDA.  Eventually, the Cards and
  45.                                    ;                           Drivers book will contain the new gamma information,
  46.                                    ;                           but that's a long time away...
  47.                                    ;NuBusTester folder       - contains a library to detect new ROMs with fixed
  48.                                    ;                           slot manager (slot manger that runs in 32-bit mode
  49.                                    ;                           as opposed to 24-bit mode)
  50.                                    ;Training Tools folder    - contains MacDraw drawings of exploded
  51.                                    ;                           configuration ROMs (like the existing Apple video
  52.                                    ;                            card ROM and the Apple EtherNet board ROM.
  53.                                    ;
  54.                                    ;Slot tools folder        - Inside, you'll find these tools:
  55.                                    ;
  56.                                    ;                            CRCPatch - MPW tool that calculates and patches in
  57.                                    ;                            the crc value of the assembled Declaration ROM file.
  58.                                    ;
  59.                                    ;                            Data - MPW tool takes the assembled file and strips off the code 0
  60.                                    ;                             segment,leaving the code 1 segment (the raw code).  The resulting
  61.                                    ;                             file can then be downloaded to a rom burning machine.
  62.                                    ;
  63.                                    ;                            Tjscomm - A small terminal program that can be used to download the data
  64.                                    ;                             file to a rom burning machine.
  65.                                    ;
  66.                                    ;                            SlotMgrTst - application that excersises the slot manager by making slot
  67.                                    ;                             manager calls
  68.                                    ;
  69.                                    ;                            GetsInfo - application that displays sResources and other configuration ROM
  70.                                    ;                             information
  71.                                    ;
  72.                                    ; Disclaimer: the above may be reorganized at any time, or changed via additions and deletions
  73.                                    ;
  74.                                    ;
  75.                                    ;  The general structure of this example ROM is:
  76.                                    ;
  77.                                    ;                        [Format/Header]
  78.                                    ;                                |
  79.                                    ;                                |
  80.                                    ;                      [sResource Directory]
  81.  
  82. MC68020 Assembler - Ver 3.0                                                                                08-Mar-89  Page   2
  83. Copyright Apple Computer, Inc. 1984-1988
  84.  
  85. Loc   F Object Code     Addr  M    Source Statement
  86.  
  87.                                    ;                            /        \
  88.                                    ;                           /         \
  89.                                    ;                          /              \
  90.                                    ;                         /               \
  91.                                    ;            [Board sResource]        [Functional sResource]
  92.                                    ;                - Primary Init.            - Driver Directory.
  93.                                    ;                - Vendor Info.
  94.                                    ;
  95.                                    ;
  96.                                    ;  If you want to print this, I suggest using landscape mode!!!
  97.                                    ;
  98.                                    ;-------------------------------------------------------------------
  99.  
  100.                                                MACHINE        MC68020
  101.  
  102.                                    ;=====================================================================
  103.                                    ;    Initial Assembler Directives
  104.                                    ;=====================================================================
  105.                                                    STRING     C
  106.                                                                                            ;Note new names since C & D book!
  107.                                                    PRINT    ON
  108.  
  109.                                    ;
  110.                                    ;=====================================================================
  111.                                    ;    BEGIN Declaration ROM
  112.                                    ;=====================================================================
  113. 00000                              SampleDeclROM    MAIN
  114. 00000
  115. 00000
  116. 00000
  117. 00000                              ;*************************************************************
  118. 00000                              ;Constants
  119. 00000                              ;*************************************************************
  120. 00000
  121. 00000   0000 1000                  ROMSize            EQU        $1000                                ;4K byte ROM in this example
  122. 00000   0000 0000                  TheBoardId        EQU        $0000                                ;the Board Id (GOTTEN from DTS!)
  123. 00000
  124. 00000                                                                                          ;board sResource equates
  125. 00000                                                                                          ;The board sResource ALWAYS has sRsrc_Type of $0001 0000 0000 0000
  126. 00000                                                                                          ;that is,    <Category> = $0001 ALWAYS for board sResource
  127. 00000                                                                                          ;            <Type>     = $0000 ALWAYS for board sResource
  128. 00000                                                                                          ;            <DrvrSW>   = $0000 ALWAYS for board sResource
  129. 00000                                                                                          ;            <DrvrHW>   = $0000 ALWAYS for board sResource
  130. 00000                              ;catBoard        EQU         1                                ;commented out since already defined in ROMEqu.a
  131. 00000                              ;TypeBoard        EQU         0                                ;commented out since already defined in ROMEqu.a
  132. 00000   0000 0000                  DrvrSwBoard        EQU         0                                ;
  133. 00000   0000 0000                  DrvrHwBoard        EQU         0                                ;
  134. 00000
  135. 00000                                                                                          ;Functional sResource equates.
  136. 00000                                                                                          ; DON'T USE THESE - GET VALUES FROM DTS.  FOR EXAMPLE ONLY
  137. 00000   0000 6666                  CatWhatCat        EQU         $6666                            ;
  138. 00000   0000 7777                  TypWhatType        EQU         $7777                            ;
  139. 00000   0000 8888                  DrSwWhatSWid    EQU         $8888                            ;
  140. 00000   0000 9999                  DrHwWhatHWid    EQU         $9999                            ;
  141. 00000
  142. 00000   0000 0000                  defMinorBase    EQU    0                                        ;in this example, RAM Offset is 0
  143. 00000   0004 0000                  defMinorLength    EQU    $40000                                    ;in this example, RAM length is $40000
  144. 00000
  145. 00000                              ;-----------  sResource Directory                            ;<Id OF>
  146. 00000   0000 0001                  sRsrc_Board        EQU        1                                    ;Board sResource {May be any number in [0..127]}
  147. 00000   0000 0080                  sRsrc_Video        EQU        128                                    ;Video sResource {May be any number in [128..254]}
  148. 00000
  149. 00000
  150. 00000                              ;=====================================================================
  151. 00000                              ;        Directory
  152. 00000                              ;=====================================================================
  153. 00000                              _sRsrcDir        OSLstEntry    sRsrc_Board,_sRsrc_Board        ;References the board sResource.
  154. 00000   0100 000C             1                    DC.L        (sRsrc_Board<<24)+_sRsrc_Board-*
  155. 00004                                              OSLstEntry    sRsrc_Video,_sRsrc_Fun            ;References the functional sResource. *** ASSIGNED BY
  156. 00004   8000 0088             1                    DC.L        (sRsrc_Video<<24)+_sRsrc_Fun-*
  157. 00008                                              DatLstEntry    endOfList,0                        ;End of the list.
  158. 00008   FF00 0000             1                    DC.L        (endOfList<<24)+0
  159. 0000C
  160. 0000C
  161.  
  162. MC68020 Assembler - Ver 3.0                                                                                08-Mar-89  Page   3
  163. Copyright Apple Computer, Inc. 1984-1988
  164.  
  165. Loc   F Object Code     Addr  M    Source Statement
  166.  
  167. 0000C                              ;=============================================================
  168. 0000C                              ;            sRsrc_Board List
  169. 0000C                              ;=============================================================
  170. 0000C                              _sRsrc_Board    OSLstEntry    sRsrcType,_BoardType            ;References the sResource type (type always sam
  171. 0000C   0100 0018             1                    DC.L        (sRsrcType<<24)+_BoardType-*
  172. 00010                                              OSLstEntry    sRsrcName,_BoardName            ;References the sResource name.
  173. 00010   0200 001C             1                    DC.L        (sRsrcName<<24)+_BoardName-*
  174. 00014                                              DatLstEntry    boardId,TheBoardId                ;The board Id.  *** ASSIGNED BY MACDTS ***
  175. 00014   2000 0000             1                    DC.L        (boardId<<24)+TheBoardId
  176. 00018                                              OSLstEntry    primaryInit,_sPInitRec            ;References the Primary init record.
  177. 00018   2200 0030             1                    DC.L        (primaryInit<<24)+_sPInitRec-*
  178. 0001C                                              OSLstEntry    vendorInfo,_VendorInfo            ;References the Vendor information list.
  179. 0001C   2400 0030             1                    DC.L        (vendorInfo<<24)+_VendorInfo-*
  180. 00020                                              DatLstEntry    endOfList,0                        ;End of the list.
  181. 00020   FF00 0000             1                    DC.L        (endOfList<<24)+0
  182. 00024
  183. 00024   0001                       _BoardType        DC.W    CatBoard                            ;<Category>
  184. 00026   0000                                       DC.W    TypBoard                            ;<Type>
  185. 00028   0000                                       DC.W    DrvrSwBoard                            ;<DrvrSw>
  186. 0002A   0000                                       DC.W    DrvrHwBoard                            ;<DrvrHw>
  187. 0002C   4F464649434941             _BoardName        DC.L    'OFFICIAL PRODUCT NAME HERE'        ;The name of the Board - should be official pro
  188. 00048
  189. 00048
  190. 00048                              ;-------------------------------------------------------------
  191. 00048                              ;            Primary Init Record (if needed)
  192. 00048                              ;-------------------------------------------------------------
  193. 00048   0000 0004                  _sPInitRec        DC.L    _EndsPInitRec-_sPInitRec            ;The physical Block Size
  194. 0004C                              ;;;                INCLUDE    'PrimaryInit.a'                        ;The Header/Code (See PrimaryInit.a)
  195. 0004C   0000 004C                  _EndsPInitRec    EQU        *                                    ;End of block
  196. 0004C                                              STRING     C                                    ;Restore to 'c' string type.
  197. 0004C
  198. 0004C
  199. 0004C                              ;-------------------------------------------------------------
  200. 0004C                              ;            Vendor Info record
  201. 0004C                              ;-------------------------------------------------------------
  202. 0004C                              _VendorInfo        OSLstEntry    VendorId,_VendorId                ;References the Vendor Id. *** VENDOR DEFINES TH
  203. 0004C   0100 0010             1                    DC.L        (VendorId<<24)+_VendorId-*
  204. 00050                                              OSLstEntry    RevLevel,_RevLevel                ;References the Revision Level. *** VENDOR DEFINES THIS,
  205. 00050   0300 0028             1                    DC.L        (RevLevel<<24)+_RevLevel-*
  206. 00054                                              OSLstEntry    PartNum,_PartNum                ;References the Part Number. *** VENDOR DEFINES THIS, NOT M
  207. 00054   0400 0030             1                    DC.L        (PartNum<<24)+_PartNum-*
  208. 00058                                              DatLstEntry    endOfList,0                        ;End of the list.
  209. 00058   FF00 0000             1                    DC.L        (endOfList<<24)+0
  210. 0005C
  211. 0005C   4D4F5354205055             _VendorId        DC.L    'MOST PUT COMPANY NAME HERE'        ;The Vendor Id
  212. 00078   426574612D3939             _RevLevel        DC.L    'Beta-99.0'                            ;The Revision Level (whatever is desired)
  213. 00084   4142432D310000             _PartNum        DC.L    'ABC-1'                                ;The Part Number (whatever is desired)
  214. 0008C
  215. 0008C
  216. 0008C                              ;=============================================================
  217. 0008C                              ;            sRsrc_Video
  218. 0008C                              ;=============================================================
  219. 0008C                              _sRsrc_Fun        OSLstEntry    sRsrcType,_FunType                ;References the functional sResource Type.
  220. 0008C   0100 001C             1                    DC.L        (sRsrcType<<24)+_FunType-*
  221. 00090                                              OSLstEntry    sRsrcName,_FunName                ;References the functional sResource Name.
  222. 00090   0200 0020             1                    DC.L        (sRsrcName<<24)+_FunName-*
  223. 00094                                              OSLstEntry    sRsrcDrvrDir,_FunDrvrDir        ;References the functional sResource driver directory
  224. 00094   0400 0048             1                    DC.L        (sRsrcDrvrDir<<24)+_FunDrvrDir-*
  225. 00098                                              DatLstEntry    sRsrcHWDevId,1                    ;The hardware device Id.
  226. 00098   0800 0001             1                    DC.L        (sRsrcHWDevId<<24)+1
  227. 0009C                                              OSLstEntry    MinorBaseOS,_MinorBase            ;References the Minor Base Offset.
  228. 0009C   0A00 0038             1                    DC.L        (MinorBaseOS<<24)+_MinorBase-*
  229. 000A0                                              OSLstEntry    MinorLength,_MinorLength        ;References the Minor Base Length.
  230. 000A0   0B00 0038             1                    DC.L        (MinorLength<<24)+_MinorLength-*
  231. 000A4                                              DatLstEntry    endOfList,0                        ;End of the list.
  232. 000A4   FF00 0000             1                    DC.L        (endOfList<<24)+0
  233. 000A8
  234. 000A8                                                                                          ;Functional sRsrc_Type labels, equates assigned by MacDTS
  235. 000A8   6666                       _FunType        DC.W    CatWhatCat                            ;<Category>
  236. 000AA   7777                                       DC.W    TypWhatType                            ;<Type>
  237. 000AC   8888                                       DC.W    DrSwWhatSWid                        ;<DrvrSw>
  238. 000AE   9999                                       DC.W    DrHwWhatHWid                        ;<DrvrHw>
  239. 000B0
  240. 000B0   57686174436174             _FunName    DC.L    'WhatCat_WhatType_WhatSWid_WhatHWid'    ;Convention: _FunName is derived by
  241.  
  242. MC68020 Assembler - Ver 3.0                                                                                08-Mar-89  Page   4
  243. Copyright Apple Computer, Inc. 1984-1988
  244.  
  245. Loc   F Object Code     Addr  M    Source Statement
  246.  
  247. 000D4                                                                                          ;using _FunName above, but stripping
  248. 000D4                                                                                          ;off the Cat,Typ, and DrSw/Hw prefixes, then
  249. 000D4                                                                                          ;separating by underscores
  250. 000D4
  251. 000D4   0000 0000                  _MinorBase        DC.L    defMinorBase                        ;RAM Offset is 0 (for example!)
  252. 000D8   0004 0000                  _MinorLength    DC.L    defMinorLength                        ;RAM length is $40000 (for example!)
  253. 000DC                                                                                          ;often this sort of thing is put in a dependant equates
  254. 000DC                                                                                          ;file (Apple puts video card dependent equates in the
  255. 000DC                                                                                          ;file DepVidEqu.a for example).  I put them at the top
  256. 000DC                                                                                          ;of this file to put them in one file.  Note the values
  257. 000DC                                                                                          ;used here are just for example purposes.
  258. 000DC
  259. 000DC
  260. 000DC                              ;-------------------------------------------------------------
  261. 000DC                              ;                Driver directory (if on board driver)
  262. 000DC                              ;-------------------------------------------------------------
  263. 000DC                              _FunDrvrDir        OSLstEntry    sMacOS68020,_sMacOS68020        ;References the Macintosh-OS 68020 driver.
  264. 000DC   0200 0008             1                    DC.L        (sMacOS68020<<24)+_sMacOS68020-*
  265. 000E0                                              DatLstEntry    endOfList,0                        ;End of the list.
  266. 000E0   FF00 0000             1                    DC.L        (endOfList<<24)+0
  267. 000E4
  268. 000E4
  269. 000E4                                                                                          ;Driver-1 (68020).
  270. 000E4   0000 0004                  _sMacOS68020    DC.L    _End020Drvr-_sMacOS68020            ;The physical Block Size
  271. 000E8                              ;;;                INCLUDE    'NameofDrvrSourceCodeFile.a'        ;The Header/Code
  272. 000E8   0000 00E8                  _End020Drvr        EQU        *                                    ;The end of the driver.
  273. 000E8                                              STRING     C
  274. 000E8
  275. 000E8
  276. 000E8
  277. 000E8
  278. 000E8   0000 0FEC                                  ORG     ROMSize-FHeaderRec.fhBlockSize
  279. 00FEC                              ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  280. 00FEC                              ;            Format/Header Block
  281. 00FEC                              ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  282. 00FEC   00FF F014                                  DC.L    (_sRsrcDir-*)**$00FFFFFF            ;Offset to sResource directory
  283. 00FF0   0000 1000                                  DC.L    ROMSize                                ;Length of declaration data
  284. 00FF4   0000 0000                                  DC.L    0                                    ;CRC {Patched by crcPatch (MPW tool)}
  285. 00FF8   01                                         DC.B    romRevision                            ;Revision level
  286. 00FF9   01                                         DC.B    AppleFormat                            ;Format
  287. 00FFA   5A93 2BC7                                  DC.L    TestPattern                            ;Test pattern
  288. 00FFE   00                                         DC.B    0                                    ;Reserved byte (must be zero)
  289. 00FFF   E1                                         DC.B    $E1                                    ;ByteLanes: 1110 0001 (bytelane 0)
  290. 01000
  291. 01000
  292. 01000                                              ENDP
  293.  
  294.                                                    END
  295.  
  296. Elapsed time: 8.93 seconds.
  297.  
  298. Assembly complete - no errors found.  3622 lines.
  299.